//
//  main.m
//  复合类型
//
//  Created by mir_yan on 2018/9/29.
//  Copyright © 2018年 hakeem. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Student.h"
#import "Book.h"
#import "Lession.h"

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        
        Book* book = [[Book alloc] init];
        book.name = @"程序之道";
        book.pages = 1000;
        
        Lession* lession = [[Lession alloc] init];
        lession.name = @"IOS";
        lession.hours = 320;
        
        Student* s1 = [[Student alloc] init];
//        Student* s1 = [[Student alloc] initWithBook:book lession:lession];
        
        s1.book = book;
        s1.lession = lession;
        
        s1.book.name = @"程序之道";
        s1.book.pages = 1000;

        s1.lession.name = @"IOS";
        s1.lession.hours = 320;
        
        [s1 showStudentMes];
        
        NSLog(@"Hello, World!");
    }
    return 0;
}
